﻿/*
	Class			ColorUtil
	
	Description		------
					
	History			1.00	7/12/07		Created
	
	To Do			------
*/

package pete.tools
{
	
public class ColorUtil
{
	public static function toARGB( color:uint, alpha:Number = 1 ):uint
	{
		var ah:uint = (alpha * 255) << 24;
		
		var c:uint = color | ah;
		
		return c;
	}
	
	public static function changeAlpha( color:uint = 0xffffffff, alpha:Number = 1 ):uint
	{
		var c:uint = color << 8 >> 8 & 0xffffff;
		
		var ca:uint = ColorUtil.toARGB( c, alpha );
		
		return ca;
	}
	
}

}